The invention relates to a method for implementing multiple format addressing in a microcontroller that has both ROM and RAM memory facility, processing facility, and bus facility for interconnecting the memory and processing facilities. A low address field is used for local addressing, and at least one facultative high address field is used for extended addressing. Many standard type microcontrollers use a sixteen-bit address space. However, present day practice has seen the necessity for extending this address space. Intel Corporation has solved this problem by introducing so-called type pointers that distinguish between two types of addresses, to wit a sixteen-bit so-called near-address, as being different from a compound address that contains an eight-bit segment address and further a sixteen-bit low-significance address. A useful reference in this respect is iC-86/286/386 Compiler User's Guide for VAX/VMS Systems, pages 4-18/19 and 4-29 through 4-39, Intel Santa Clara Calif. 1991. Although with this organization various different memory configurations and memory sizes can be addressed, discriminating between ROM and RAM necessitates various different steps and various different address interpretations. For example, p.4-29 lists no less than nine different cases that must be handled. Furthermore, this organization is not very attractive for programming in embedded systems, because the difference between addressing data RAM and program ROM is not immediately clear, whereas in particular embedded systems frequently use an interspersed string of these two categories. Such embedded microcontrollers are often used as mere subaltern tools in comprehensive systems of a much greater degree of complexity.
Note that according to the Intel setup, segments could be mutually overlapping, in that the displacement of the header address between two successive segments is less than the length of the previous segment. Even this complicating feature can be taken into account by the present invention, as hereinafter explained.